package com.ruoyi.member.controller;

import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.member.domain.BmInorderlist;
import com.ruoyi.member.service.LogisticsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @Author {那蓝桉}
 * @Date: 2023/08/21/ 20:07
 * @description
 */
@RestController
@RequestMapping("/logistics")
public class LogisticsController extends BaseController {
    @Autowired
    private LogisticsService logisticsService;

    @GetMapping("/orderShipment/{id}")
    public List<Map<String,Object>> orderShipment(@PathVariable Long id){
        return logisticsService.orderShipment(id);
    }
    @GetMapping("/updateShipment/{order_code}")
    public int updateShipment(@PathVariable("order_code") String orderCode){
        return logisticsService.updateShipment(orderCode);
    }
    @GetMapping("/updateShipment2/{order_code}")
    public int updateShipment2(@PathVariable("order_code") String orderCode){
        return logisticsService.updateShipment2(orderCode);
    }
    @GetMapping("/allOrderShipment/{id}")
    public List<Map<String,Object>> allOrderShipment(@PathVariable Long id){
        return logisticsService.allOrderShipment(id);
    }
    @GetMapping("/orderSubShipment/{id}")
    public List<Map<String,Object>> orderSubShipment(@PathVariable Long id){
        return logisticsService.orderSubShipment(id);
    }
    @GetMapping("/otherOrderShipment/{id}")
    public List<Map<String,Object>> otherOrderShipment(@PathVariable Long id){
        return logisticsService.otherOrderShipment(id);
    }
}
